﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 坚山面料维护
{
    public partial class Frm面料号录入 : DevExpress.XtraEditors.XtraForm
    {
        public Frm面料号录入()
        {
            InitializeComponent();
        }

        private void simpleButton保存_Click(object sender, EventArgs e)
        {
            string sql = ("select 1 from Kashiyama_MATERIAL where MATERIAL_CODE='" + this.textBox面料号.Text + "';");
            if (SQl大连云.GetDataRow(sql) == null)
            {
                //insert
                SQl大连云.ExecuteSql("INSERT INTO Kashiyama_MATERIAL (MATERIAL_CODE) VALUES('" + this.textBox面料号.Text + "')"); 
            }
            else
            {
                MessageBox.Show("面料号重复");
            }
        }
    }
}
